@echo off
echo Starting Simple Fire Detection API Server...
echo 正在启动简化版火灾检测API服务器...

cd /d "D:\code\DT_project_brandnew\FireDetection_backend"

echo Checking Python environment...
echo 检查Python环境...

python --version
if %errorlevel% neq 0 (
    echo Python is not installed or not in PATH!
    echo Python未安装或未添加到PATH环境变量！
    pause
    exit /b 1
)

echo Installing required packages...
echo 安装所需的Python包...

pip install flask flask-cors opencv-python pillow requests

echo Starting Simple Fire Detection API Server on port 5000...
echo 在端口5000启动简化版火灾检测API服务器...
echo.
echo This service provides:
echo 此服务提供：
echo - HTTP API only / 仅HTTP API
echo - No WebSocket / 无WebSocket
echo - Simple and stable / 简单稳定
echo - Image upload detection / 图片上传检测
echo.
echo Make sure Ollama is running with gemma3:latest model
echo 请确保Ollama正在运行并已安装gemma3:latest模型
echo.

python fire_detection_api_simple.py

pause
